v = VideoReader('badapple.mp4');
while hasFrame(v)
    frame = readFrame(v);
    bw = edge(frame(:,:,1),'canny');
    [idxX,idxY] = find(bw);
    
    scatter(idxY,max(idxX)+10-idxX,'.')
    xlim([0 600]);
    ylim([0,600]);
    
    drawnow
end